3.124 \(\int x \sqrt {a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=58 \[ \frac {4 \sqrt {a \sin (c+d x)+a}}{d^2}-\frac {2 x \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right ) \sqrt {a \sin (c+d x)+a}}{d} \]

[Out]

4*(a+a*sin(d*x+c))^(1/2)/d^2-2*x*cot(1/2*c+1/4*Pi+1/2*d*x)*(a+a*sin(d*x+c))^(1/2)/d

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3319, 3296, 2638} \[ \frac {4 \sqrt {a \sin (c+d x)+a}}{d^2}-\frac {2 x \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right ) \sqrt {a \sin (c+d x)+a}}{d} \]

Antiderivative was successfully verified.

[In]

Int[x*Sqrt[a + a*Sin[c + d*x]],x]

[Out]

(4*Sqrt[a + a*Sin[c + d*x]])/d^2 - (2*x*Cot[c/2 + Pi/4 + (d*x)/2]*Sqrt[a + a*Sin[c + d*x]])/d

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3319

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[((2*a)^IntPart[n
]*(a + b*Sin[e + f*x])^FracPart[n])/Sin[e/2 + (a*Pi)/(4*b) + (f*x)/2]^(2*FracPart[n]), Int[(c + d*x)^m*Sin[e/2
 + (a*Pi)/(4*b) + (f*x)/2]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[n
 + 1/2] && (GtQ[n, 0] || IGtQ[m, 0])

Rubi steps

\begin {align*} \int x \sqrt {a+a \sin (c+d x)} \, dx &=\left (\csc \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}\right ) \int x \sin \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \, dx\\ &=-\frac {2 x \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d}+\frac {\left (2 \csc \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}\right ) \int \cos \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \, dx}{d}\\ &=\frac {4 \sqrt {a+a \sin (c+d x)}}{d^2}-\frac {2 x \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.20, size = 76, normalized size = 1.31 \[ -\frac {2 \sqrt {a (\sin (c+d x)+1)} \left ((d x-2) \cos \left (\frac {1}{2} (c+d x)\right )-(d x+2) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{d^2 \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[x*Sqrt[a + a*Sin[c + d*x]],x]

[Out]

(-2*((-2 + d*x)*Cos[(c + d*x)/2] - (2 + d*x)*Sin[(c + d*x)/2])*Sqrt[a*(1 + Sin[c + d*x])])/(d^2*(Cos[(c + d*x)
/2] + Sin[(c + d*x)/2]))

________________________________________________________________________________________

fricas [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+a*sin(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (ha
s polynomial part)

________________________________________________________________________________________

giac [A]  time = 0.83, size = 69, normalized size = 1.19 \[ 2 \, \sqrt {2} {\left (\frac {x \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{d} + \frac {2 \, \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}{d^{2}}\right )} \sqrt {a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+a*sin(d*x+c))^(1/2),x, algorithm="giac")

[Out]

2*sqrt(2)*(x*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*sin(-1/4*pi + 1/2*d*x + 1/2*c)/d + 2*cos(-1/4*pi + 1/2*d*x +
1/2*c)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))/d^2)*sqrt(a)

________________________________________________________________________________________

maple [C]  time = 0.06, size = 93, normalized size = 1.60 \[ -\frac {i \sqrt {2}\, \sqrt {-a \left (-2-2 \sin \left (d x +c \right )\right )}\, \left (-i d x +d x \,{\mathrm e}^{i \left (d x +c \right )}+2 i {\mathrm e}^{i \left (d x +c \right )}-2\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1+2 i {\mathrm e}^{i \left (d x +c \right )}\right ) d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+a*sin(d*x+c))^(1/2),x)

[Out]

-I*2^(1/2)*(-a*(-2-2*sin(d*x+c)))^(1/2)/(exp(2*I*(d*x+c))-1+2*I*exp(I*(d*x+c)))*(-I*d*x+d*x*exp(I*(d*x+c))+2*I
*exp(I*(d*x+c))-2)*(exp(I*(d*x+c))+I)/d^2

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \sin \left (d x + c\right ) + a} x\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+a*sin(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(a*sin(d*x + c) + a)*x, x)

________________________________________________________________________________________

mupad [B]  time = 0.23, size = 47, normalized size = 0.81 \[ \frac {2\,\sqrt {a\,\left (\sin \left (c+d\,x\right )+1\right )}\,\left (2\,\sin \left (c+d\,x\right )-d\,x\,\cos \left (c+d\,x\right )+2\right )}{d^2\,\left (\sin \left (c+d\,x\right )+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + a*sin(c + d*x))^(1/2),x)

[Out]

(2*(a*(sin(c + d*x) + 1))^(1/2)*(2*sin(c + d*x) - d*x*cos(c + d*x) + 2))/(d^2*(sin(c + d*x) + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x \sqrt {a \left (\sin {\left (c + d x \right )} + 1\right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+a*sin(d*x+c))**(1/2),x)

[Out]

Integral(x*sqrt(a*(sin(c + d*x) + 1)), x)

________________________________________________________________________________________